project(socket)

set(CMAKE_CXX_STANDARD 20)

set(LOCAL_DIR .)

set(FILE_LIST 
    ${LOCAL_DIR}/Connection.hpp
    ${LOCAL_DIR}/Connection.cpp
    ${LOCAL_DIR}/ConnPool.hpp
    ${LOCAL_DIR}/Dispatch.hpp
    ${LOCAL_DIR}/Dispatch.cpp
    ${LOCAL_DIR}/BlockPool.hpp
    ${LOCAL_DIR}/BlockPool.cpp
    ${LOCAL_DIR}/Reactor.hpp
    ${LOCAL_DIR}/Reactor.cpp
    ${LOCAL_DIR}/Socket.hpp
    ${LOCAL_DIR}/Socket.cpp
    ${LOCAL_DIR}/TcpBuffer.hpp
    ${LOCAL_DIR}/TcpBuffer.cpp
)

add_library(sock ${FILE_LIST})
target_link_libraries(sock base)